Optimal. Leaf size=69 \[ \frac{(a+b x) (A b-a B) \log (a+b x)}{b^2 \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{B \sqrt{a^2+2 a b x+b^2 x^2}}{b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0247329, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.115, Rules used = {640, 608, 31} \[ \frac{(a+b x) (A b-a B) \log (a+b x)}{b^2 \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{B \sqrt{a^2+2 a b x+b^2 x^2}}{b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 640
Rule 608
Rule 31
Rubi steps
\begin{align*} \int \frac{A+B x}{\sqrt{a^2+2 a b x+b^2 x^2}} \, dx &=\frac{B \sqrt{a^2+2 a b x+b^2 x^2}}{b^2}+\frac{\left (2 A b^2-2 a b B\right ) \int \frac{1}{\sqrt{a^2+2 a b x+b^2 x^2}} \, dx}{2 b^2}\\ &=\frac{B \sqrt{a^2+2 a b x+b^2 x^2}}{b^2}+\frac{\left (\left (2 A b^2-2 a b B\right ) \left (a b+b^2 x\right )\right ) \int \frac{1}{a b+b^2 x} \, dx}{2 b^2 \sqrt{a^2+2 a b x+b^2 x^2}}\\ &=\frac{B \sqrt{a^2+2 a b x+b^2 x^2}}{b^2}+\frac{(A b-a B) (a+b x) \log (a+b x)}{b^2 \sqrt{a^2+2 a b x+b^2 x^2}}\\ \end{align*}
Mathematica [A] time = 0.0168415, size = 40, normalized size = 0.58 \[ \frac{(a+b x) ((A b-a B) \log (a+b x)+b B x)}{b^2 \sqrt{(a+b x)^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 43, normalized size = 0.6 \begin{align*}{\frac{ \left ( bx+a \right ) \left ( A\ln \left ( bx+a \right ) b-B\ln \left ( bx+a \right ) a+bBx \right ) }{{b}^{2}}{\frac{1}{\sqrt{ \left ( bx+a \right ) ^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.04469, size = 80, normalized size = 1.16 \begin{align*} A \sqrt{\frac{1}{b^{2}}} \log \left (x + \frac{a}{b}\right ) - \frac{B a \sqrt{\frac{1}{b^{2}}} \log \left (x + \frac{a}{b}\right )}{b} + \frac{\sqrt{b^{2} x^{2} + 2 \, a b x + a^{2}} B}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.6324, size = 54, normalized size = 0.78 \begin{align*} \frac{B b x -{\left (B a - A b\right )} \log \left (b x + a\right )}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.354707, size = 20, normalized size = 0.29 \begin{align*} \frac{B x}{b} - \frac{\left (- A b + B a\right ) \log{\left (a + b x \right )}}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15999, size = 61, normalized size = 0.88 \begin{align*} \frac{B x \mathrm{sgn}\left (b x + a\right )}{b} - \frac{{\left (B a \mathrm{sgn}\left (b x + a\right ) - A b \mathrm{sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]